<B:UIMVART x:Class="WPFExcelReport.TGTTVA06"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"     
                   xmlns:B="clr-namespace:WPFExcelReport;assembly=TVAART" 
           xmlns:me="clr-namespace:WPFExcelReport" 
                    xmlns:T="clr-namespace:WPFExcelReport;assembly=IntexBL" 
                    xmlns:SD="clr-namespace:WPFExcelReport;assembly=TSDDAT" 
                    xmlns:VAK="clr-namespace:WPFExcelReport;assembly=TVAKOLL" 
                    xmlns:WS="clr-namespace:WPFExcelReport;assembly=TWASTAMM" 
                    xmlns:DR="clr-namespace:WPFExcelReport;assembly=TDRAUFTR" 
                    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls" 
                     xmlns:Localization="clr-namespace:Localization;assembly=Localization"
                     xmlns:TXT="clr-namespace:WPFExcelReport;assembly=TTXTIND"  
                        xmlns:VD="clr-namespace:WPFExcelReport;assembly=TVADBLATT" 
                    xmlns:VKK="clr-namespace:WPFExcelReport;assembly=TVKKOPF"  
                    xmlns:LS="clr-namespace:WPFExcelReport;assembly=TLIEFDAT"  
                    xmlns:VF="clr-namespace:WPFExcelReport;assembly=TVAFARBEN"  
                   x:Name="TV"
                    Loaded="Window_Loaded"
     >
    <B:UIMVART.Resources>
        <CollectionViewSource  x:Key="vwMaster"/>
        <CollectionViewSource  x:Key="vwDetail"/>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:NOTBoolToVisibilityConverter  x:Key="nbv"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:NOTConverter  x:Key="not"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <ucd:TRIMGB2312Convert8859P1 x:Key="tgb"/>
        <ucd:TextTrimmingConverter x:Key ="trim"/>
    </B:UIMVART.Resources>

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="1*"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*"></ColumnDefinition>
            <ColumnDefinition Width="Auto"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2">
            <WrapPanel    Margin="0,5,0,0">
                <Button  Click="QueryCommand" Height="20" Margin="5,0,0,0" Width="24" >
                    <Button.Background>
                        <ImageBrush  ImageSource="/ImagePackage;component/Images/Search.png" />
                    </Button.Background>
                </Button>
                <me:UIQTYT    KOLL="{Binding KOLL,ElementName=TV}"
                   ART="{Binding ART,ElementName=TV}"
                    VAR="{Binding VAR,ElementName=TV}" 
                   FARBE="{Binding FARBE,ElementName=TV}"
                  DES="{Binding DES,ElementName=TV}"  
                    PRODGRP="{Binding PRODGRP,ElementName=TV}"   
                /> 
            </WrapPanel>
        </StackPanel>
        <StackPanel Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2">           
            <WrapPanel Margin="0,5,0,0"  VerticalAlignment="Top">
                <Grid Margin="0,0,0,0"  VerticalAlignment="Top" >
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <Button   Click="NewCommand" Height="20" Margin="5,0,0,0" Width="24" Visibility="{Binding IsNew,Converter={StaticResource nbv}}" >
                        <Button.Background>
                            <ImageBrush  ImageSource="/ImagePackage;component/Images/Add.png" />
                        </Button.Background>
                    </Button>
                    <Button   Click="NewCommand" Height="20" Margin="5,0,0,0" Width="24"  Visibility="{Binding IsNew,Converter={StaticResource bv}}" >
                        <Button.Background>
                            <ImageBrush  ImageSource="/ImagePackage;component/Images/button_ok.png" />
                        </Button.Background>
                    </Button>
                </Grid>
                <Grid Margin="10,0,0,0"  VerticalAlignment="Top">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <Button   Click="EditCommand" Height="20" Margin="5,0,0,0" Width="24" >
                        <Button.Background>
                            <ImageBrush  ImageSource="/ImagePackage;component/Images/Edit.png" />
                        </Button.Background>
                    </Button>
                </Grid>
                <Grid Margin="10,0,0,0" Visibility="{Binding IsEdit,Converter={StaticResource bv}}" VerticalAlignment="Top">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <Button Click="DeleteCommand" Height="20" Margin="5,0,0,0" Width="24" >
                        <Button.Background>
                            <ImageBrush  ImageSource="/ImagePackage;component/Images/remove.png" />
                        </Button.Background>
                    </Button>
                </Grid>
                <Grid Margin="10,0,0,0"  VerticalAlignment="Top">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <Button    Click="CopyCommand" Height="20" Margin="5,0,0,0" Width="24" >
                        <Button.Background>
                            <ImageBrush  ImageSource="/ImagePackage;component/Images/copy.png" />
                        </Button.Background>
                    </Button>
                </Grid>
                <Grid Margin="10,0,0,0" VerticalAlignment="Top" Visibility="Collapsed">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <DR:TDRAUFTR  Grid.Column="0" Name="cDR" 
                                           VerticalAlignment="Top"
                                          DocType="{Binding VALBTYP,ElementName=TV}" 
                                          PrintType="OpenExcel" />
                    <Button  Grid.Column="1"  Click="btnPrint_Click" Height="20"
                                      VerticalAlignment="Top"
                                     Margin="5,0,0,0" Width="Auto" Content="{Binding Source={Localization:Translate Word=打印标签}}" />
                </Grid>
                <Grid Margin="10,0,0,0" VerticalAlignment="Top" Visibility="Collapsed">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <DR:TDRAUFTR  Grid.Column="0" Name="cDRVA06" 
                                           VerticalAlignment="Top"
                                           DocType="TSTVA06"   
                                           PrintType="OpenExcel" Visibility="Collapsed" />
                    <Button  Grid.Column="1"  Click="btnPrintVA06_Click" Height="20"
                                      VerticalAlignment="Top"
                                     Margin="5,0,0,0" Width="Auto"  Content="{Binding Source={Localization:Translate Word=导出Excel}}" />

                </Grid>
                <Grid Margin="10,0,0,0" Visibility="{Binding IsEdit,Converter={StaticResource bv}}"  VerticalAlignment="Top">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <Button   Click="SaveCommand" Height="20" Margin="5,0,0,0" Width="24" >
                        <Button.Background>
                            <ImageBrush  ImageSource="/ImagePackage;component/Images/Save.png" />
                        </Button.Background>
                    </Button>
                </Grid>
                
            </WrapPanel>
            <WrapPanel Grid.Row="0" Height="40" Background="LightBlue"
            Margin="0,5,0,0" Visibility="{Binding IsNew,ElementName=TV,Converter={StaticResource bv}}"
                        VerticalAlignment="Top">
                <CheckBox Content="{Binding Source={Localization:Translate Word=自有品号}}" Visibility="Collapsed" IsChecked="{Binding IsSelfART,ElementName=TV}"></CheckBox>
                <Grid Margin="5,0,0,0" VerticalAlignment="Top">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="{Binding Source={Localization:Translate Word=季节}}" />
                    <VAK:TSVA02 Grid.Column="1" KEY="{Binding KOLL,ElementName=TV}"/>
                </Grid>
                <Grid Margin="5,0,0,0" VerticalAlignment="Top" >
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=品号:}}"></TextBlock>
                    <ex:TXT72  Grid.Column="1" MaxLength="20" CharacterCasing="Upper"
                                           Text="{Binding EXART,ElementName=TV,Converter={StaticResource gb2312}}" Width="160" FontSize="18"  />
                </Grid>
                <TextBlock Text="{Binding Source={Localization:Translate Word=色号}}"/>
                <ex:TXT72 Text="{Binding FARBE,ElementName=TV}" MaxLength="10" Width="60"/>
                <Grid Margin="5,0,0,0" VerticalAlignment="Top" 
                              >
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="{Binding Source={Localization:Translate Word=客户组}}"/>
                    <SD:TSSD0196 Grid.Column="1" 
                                             KEY="{Binding PRODGRP,ElementName=TV}" MinWidth="100"/>
                </Grid>
                <Grid Margin="5,0,0,0" VerticalAlignment="Top" >
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <SD:TSSD0178 KEY="{Binding ARTGRP,ElementName=TV}"  MinWidth="100" />
                </Grid>
                <Grid Margin="5,0,0,0" VerticalAlignment="Top" Visibility="Collapsed"
                              >
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <Button Name="btnGetNART" Visibility="Collapsed" Click="btnGetNART_Click" Content="{Binding Source={Localization:Translate Word=新品种:}}"></Button>
                    <ex:TXT72  Grid.Column="1" Text="{Binding NART,ElementName=TV}" MaxLength="24"  CharacterCasing="Upper"   Width="130" FontSize="18"/>
                </Grid>

                <Grid Margin="5,0,0,0" VerticalAlignment="Top" Visibility="Collapsed">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <CheckBox Grid.Column="0"  Content="{Binding Source={Localization:Translate Word=一致}}" 
                                      Visibility="{Binding IsSelfART,ElementName=TV,Converter={StaticResource bv}}"
                                      IsChecked="{Binding IsSameProdArt,ElementName=TV}"></CheckBox>
                    <TextBlock   Grid.Column="1" Text="{Binding Source={Localization:Translate Word=供应商品号:}}"></TextBlock>
                    <ex:TXT72  Grid.Column="2" MaxLength="20" CharacterCasing="Upper"
                                           Text="{Binding EXART,ElementName=TV,Converter={StaticResource gb2312}}" Width="160" FontSize="18"  />
                </Grid>
            </WrapPanel>
            <me:UVA07TYT   
                    IsEdit="{Binding IsEdit,ElementName=TV}" 
           IsNew="{Binding IsNew,ElementName=TV}"
           IsSelfART="{Binding IsSelfART,ElementName=TV}"
                 KEY="{Binding KEY,ElementName=TV}" 
           KOLL="{Binding KOLL,ElementName=TV}" 
            FARBE="{Binding FARBE,ElementName=TV}" 
             PRODGRP="{Binding PRODGRP,ElementName=TV}"  
            ARTGRP="{Binding ARTGRP,ElementName=TV}"
             NART="{Binding NART,ElementName=TV}"
             IsSameProdArt="{Binding IsSameProdArt,ElementName=TV}" 
             EXART="{Binding EXART,ElementName=TV}"
             WSPRICE="{Binding WSPRICE,ElementName=TV}"
             CURRENCY="{Binding CURRENCY,ElementName=TV}"
               PRMEEH="{Binding PRMEEH,ElementName=TV}"  
                />
            <VD:TVA11 
                IsAuto="True"
                IsEdit="{Binding IsEdit,ElementName=TV}"
                IsSaved="{Binding IsSaved,ElementName=TV}"
                ORDERNUM="{Binding KEY,ElementName=TV}"/>
        </StackPanel>
        <me:LSTVATYT Grid.Row="2" Grid.Column="0" 
                      KEY="{Binding KEY,ElementName=TV}" 
                    PRART="{Binding PRART,ElementName=TV}" 
                     WSPRICE="{Binding WSPRICE,ElementName=TV}"  
                    CURRENCY="{Binding CURRENCY,ElementName=TV}"
                     PRMEEH="{Binding PRMEEH,ElementName=TV}"
                     TXTISIND="{Binding TXTISIND,ElementName=TV}" 
                     />
        <Grid Grid.Row="1" Grid.RowSpan="2" Grid.Column="1" >
            <Grid.RowDefinitions>
                <RowDefinition Height="1*"/>
                <RowDefinition Height="1*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
                <ColumnDefinition Width="1*"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <VF:TWVA09 Grid.Row="0"  Grid.Column="0" Margin="0,5,0,0" 
                       Name="cVA09"
                       IsAuto="True"
                       dwVA="{Binding dwVA,ElementName=TV}" 
                       PRART="{Binding PRFART,ElementName=TV}"
                       KOLL="{Binding KOLL,ElementName=TV}"
                       ART="{Binding NART,ElementName=TV}"
                       FARBE="{Binding FARBE,ElementName=TV}"
                        EXAUF="{Binding KEY,ElementName=TV}"
                      
                       />
            <TXT:TXTITX Grid.Row="1"  Grid.Column="0" Margin="0,0,0,0"
                        TART="WFT"
                        SIND="{Binding TXTISIND,ElementName=TV}"  
                        IsEdit="{Binding IsEdit,ElementName=TV}"
                        DEFTXT="{Binding DEFTXT,ElementName=TV}"   
                        VerticalAlignment="Top"/>
         

        </Grid>
        <WrapPanel Grid.Row="3" Grid.Column="0">
            <TextBlock Margin="10,0,0,0" Text="{Binding Source={Localization:Translate Word=创建}}"/>
            <TextBlock Margin="10,0,0,0" Text="{Binding VAANEUBEN}"/>
            <TextBlock Margin="10,0,0,0" Text="{Binding Source={Localization:Translate Word=日期}}"/>
            <TextBlock Margin="10,0,0,0" Text="{Binding VAANEUDAT}"/>
            <TextBlock Margin="10,0,0,0" Text="{Binding Source={Localization:Translate Word=更改}}"/>
            <TextBlock Margin="10,0,0,0" Text="{Binding VAAAENDBEN}"/>
            <TextBlock Margin="10,0,0,0" Text="{Binding Source={Localization:Translate Word=日期}}"/>
            <TextBlock Margin="10,0,0,0" Text="{Binding VAAAENDDAT}"/> 
        </WrapPanel>
    </Grid>
</B:UIMVART>
